package demo.controller;

import com.jfinal.aop.Before;
import com.jfinal.core.Controller;

import demo.inteceptor.BlogInteceptor;
import demo.inteceptor.DemoInteceptor;
import demo.model.Blog;
@Before(DemoInteceptor.class)
public class BlogController extends Controller {
	@Before(BlogInteceptor.class)
	public void index(){
		renderText("There is blogController");
	}
	
	public void save(){
		Blog blog = this.getModel(Blog.class);
		renderText("name: " + blog.getName() + ", content:" + blog.getContent());
	}
}
